package com.ys.controller.api.business;

import javax.servlet.http.HttpServletRequest;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ys.entity.business.TpBoutiqueDiscount;
import com.ys.service.business.TpBoutiqueDiscountService;
import com.ys.service.sys.CommonApiService;
import com.ys.vo.LayuiTableVoJA;
import com.ys.vo.R;

@Controller
@RequestMapping("/api/inter/tpBoutiqueDiscount")
public class ApiInterTpBoutiqueDiscountController {
	
	@Autowired
	private CommonApiService<TpBoutiqueDiscount> commonApiService;
	@Autowired
	private TpBoutiqueDiscountService tpBoutiqueDiscountService;

    @RequiresPermissions("tpBoutiqueDiscount:view")
	@RequestMapping("/search")
	@ResponseBody
	public LayuiTableVoJA search(@ModelAttribute TpBoutiqueDiscount cond){
		return commonApiService.searchLay(cond);
	}
	
	/**
	 * 新增
	 */
	@PostMapping("/setting")
    @ResponseBody
	public R setting(HttpServletRequest request, String priceArr){
		return tpBoutiqueDiscountService.setting(priceArr);
	}
}